﻿<!DOCTYPE html>
<html>
<!-- 安全经验分享库-统计 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <p>{{summaryData.name}} {{summaryData.startDate}} 至 {{summaryData.endDate}} 上传文件数量 {{summaryData.recordCount}}条</p>
        <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight" border
                  @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;margin-top:10px;">
            <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                             show-overflow-tooltip="true"></el-table-column>
            <el-table-column align="center" prop="Name" show-overflow-tooltip="true"
                             :label="HSEComplianceCertificateLibraryforFactoryOperations.Name">
                <template slot-scope="scope">
                    <el-button type="text" @click="label_click('xg',scope.row.attachmentId)">
                        {{scope.row.name}}
                    </el-button>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="createTime" :label="SecurityExperienceSharingLibrary.Dateofaddition">
            </el-table-column>
            <el-table-column align="center" prop="createUserText" :label="SecurityExperienceSharingLibrary.Addpeople">
            </el-table-column>
        </el-table>
        <el-row type="flex" justify="end" style="margin-top:10px;">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                           :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                           :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <!-- 弹出页 -->
        <el-dialog title="文件详情" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
                   top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
        <br>
        <el-button class="fr" type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: '',
                //父业传参
                id: '',
                //表单内容
                ListItem: ListItem,
                //获取下拉菜单situation
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    createUser: guidEmpty,
                    Name: '',
                    Dateofaddition: '',
                    Conferencecontent: '',
                },
                formInline: {
                    model: { name: '', createTime: null, createUser: null },
                    offset: 0,
                    limit: 10
                },
                summaryData: {
                    name: '',
                    startDate: '',
                    endDate: '',
                    recordCount: 0

                },
            },
            created: function () {
                //var currApp = this;
                //window.onresize = function () {
                //    currApp.ListItem.tableHeight = window.innerHeight -
                //        currApp.$refs.table.$el.offsetTop - 60;
                //    if (currApp.ListItem.tableHeight < 112) {
                //        currApp.ListItem.tableHeight = 112;
                //    }
                //}
            },
            ounted: function () {

                console.log(getDicDataArray(["01", "02", "03", "04"]))

                //获取下拉菜单内容
                this.F_PreworkSafetyMeasures = getDicData('55');


                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.Form.createUser = this.id;
                if (this.id != null) {
                    var mythis = this;
                    if (mythis.id != null && mythis.id != '') {
                        myAjax("get", mythis, '/api/ZB_SafetyShare/GetPersonSummary?personId=' + mythis.Form.createUser, null, function (response) {
                            var data = response.data;
                            mythis.summaryData = data;
                        }, false);
                    }
                }

                //console.log(getDicDataArray(["01", "02", "03", "04"]))

                //获取下拉菜单内容
                //this.F_PreworkSafetyMeasures = getDicData('55');


                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);


                //this.getData();

                //初始化数据
                // this.GetPageData(1);

            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //点击表格中数据发生方法
                label_click: function (val, id) { DialogShow(this, val, "SecurityExperienceSharingLibraryInputShow.html", id); },
                getData: function () {
                    getData(this, '/api/SecurityExperienceSharingLibrary/get?id=' + this.id);
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //关闭Dialog 回调
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/SecurityExperienceSharingLibrary/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "SecurityExperienceSharingLibraryInput.html", id); },
                UserInputStatistics: function (val, id) { DialogShow(this, val, "SecurityExperienceSharingLibraryStatisticsInput.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/ZB_SafetyShare/GetPersonList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                }

            }
        });
    </script>
</body>

</html>